package com.kws.merchant.config;

import com.kws.common.redis.service.RedisService;
import com.kws.common.security.service.TokenService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;

/**
 * @author : zhangbenting
 * @date : 2024/11/18 18:58
 * @Version: 1.0
 */
@Configuration
public class RedisServiceConfig {
    @Bean
    public RedisService redisService() {
        return new RedisService();
    }

    @Bean
    public RedisMessageListenerContainer redisContainer(RedisConnectionFactory connectionFactory) {
        RedisMessageListenerContainer container = new RedisMessageListenerContainer();
        container.setConnectionFactory(connectionFactory);
        return container;
    }
}
